As a semiconductor device having a rectifying function, a JBS (junction barrier Schottky) diode in which a Schottky barrier junction and a p-n junction coexist is known. The JBS diode includes a plurality of p-type semiconductor regions formed in an n-type semiconductor region and a Schottky barrier metal that is in contact with the n-type semiconductor region and the p-type semiconductor region. The JBS diode is a structure that relaxes the electric field at the interface between the n-type semiconductor region and the Schottky electrode during reverse bias and reduces leakage. For the semiconductor device, it is important to further improve the withstand capability to surge voltage etc.